package com.ljh.nio.c3;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.StandardCharsets;

/**
 * @author: Themberfue
 * @date: 2025/5/26 14:43
 * @description:
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost", 8080));

        System.out.println("waiting...");
        sc.write(StandardCharsets.UTF_8.encode("helloworld1234567890111222\n"));
        sc.close();
    }
}
